//
// Created by Senhai Xu on 2025/3/3.
//
#include <chrono>
#include <functional>
#include <future>
#include <iostream>
#include <string>
#include <windows.h>

class A {
public:
    A() {
        std::cout << "A() \n";
    }

    ~A() {
        std::cout << "~A() \n";
    }

    A(const A& a) {
        count_ = a.count_;
        std::cout << "A copy \n";
    }

    A& operator=(const A& a) {
        count_ = a.count_;
        std::cout << "A = \n";
        return *this;
    }

    A(A&& a) {
        count_ = a.count_;
        std::cout << "A move \n";
    }

    A& operator=(A&& a) {
        count_ = a.count_;
        std::cout << "A move = \n";
        return *this;
    }

    std::string count_;
};


struct B {
    char a;
    long long b;
    int c;
    char d[10];
};

int main() {
    A a;
    A c=A();
    c.count_ = "123456";
    a.count_ = "12345";
    A b = std::move(a);
    A d = std::move(c);
    std::cout << a.count_ << std::endl;
    std::cout << d.count_ << std::endl;
    std::cout <<sizeof (int *)<< std::endl;
    SYSTEM_INFO system_info;
    GetSystemInfo(&system_info);

    // 获取系统页大小
    DWORD page_size = system_info.dwPageSize;
    std::cout << "System page size (Windows): " << page_size << " bytes" << std::endl;
    return 0;
}
